import {makeAutoObservable} from 'mobx';
​
class Count {
  counter=0;
  constructor() {
    //不加上，数据变 但是视图不变
    makeAutoObservable(this)
  }
  // 方法
  increment = () => {
    this.counter = this.counter + 1
  }
  get doble(){
    return this.counter * 2
  }
}
​
const counterStore = new Count();
export {counterStore}
